<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/* 
	获取授权信息
*/
class Oauth extends Base_Controller{

	public function __construct(){
		parent::__construct();
	}
	
	public function get_access_token(){
		$this->load->library('Wework/wework', [
			'corpsecret' => 'pjQrOogM4feQ_oqbnZ697Civt5kGR7P3dAdUCFo-O1Y'
		]);
		$token = $this->wework->get_accesstoken();
		if(!$token){
			$this->output_json('获取失败');
		}
		$this->output_json([
			'access_token' => $token
		], 0);
	}
	
}